# name : proc lifetest
# key : lifetest.
# key : product-limit.
# key : kaplan-meier.
# key : logrank.
# contributor: Shuguang Sun
# --
ods select quartiles means homstats homtests survdiff survivalplot censoredsummary;
ods output lifetest.stratum1.productlimitestimates = $5_prodest1;
ods output lifetest.stratum2.productlimitestimates = $5_prodest2;
ods output homtests = ${5:km}_testp;
ods output quartiles = $5_quart;
proc lifetest data = ${1:dtin}
method = km alpha = 0.05 alphaqt = 0.05 conftype = linear
timelist = 12 reduceout outsurv=os
plots = survival(atrisk=0,8,12 test);
time ${2:aval} * ${3:cnsr} (1);
strata $0 / group = ${4:trt01p} test=(logrank wilcoxon lr) diff;
run;
